Repository navigation
[51.0.x] Restore lenient base64 decoding for Fernet keys and tokens (#16116) - #16118
Merged
Merged
Conversation
* Restore lenient base64 decoding for Fernet keys and tokens The Rust port of Fernet in 51.0.0 rejected keys and tokens with non-zero trailing bits or embedded whitespace, which Python's base64.urlsafe_b64decode previously accepted. Allow both again. Fixes #16110 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxTgQg9sjt6Qw5StZH * Drop changelog entry; it will land with the 51.0.x backport Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxTgQg9sjt6Qw5StZH --------- Co-authored-by: Claude <noreply@anthropic.com> (cherry picked from commit 40da4b8)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxTgQg9sjt6Qw5StZH
…aude/adoring-heisenberg-iebmcq # Conflicts: # CHANGELOG.rst
alex
approved these changes
Dec 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #16116 to the 51.0.x branch. Fixes #16110.
51.0.0's Rust Fernet implementation rejected keys and tokens whose base64 encoding has non-zero trailing bits or contains ASCII whitespace, both of which 50.x accepted. This allows them again.
The cherry-pick applied cleanly. This PR also adds a 51.0.1 changelog section with an entry for the regression fix.
Generated by Claude Code